import * as types from '../types'

export const CurrentItem = {
  //namespaced: true,
  state: {
    currentItem: -1,
    currentbottomItem: -1,
    house: '1'
  },
  getters: {
    getterCurrentItem: state => state.currentItem,
    getterBottomCurrentItem: state => state.currentbottomItem,
    getterHouse: state => state.house
  },
  mutations: {
    [types.SET_SLIDER_ITEM](state, index) {
      state.currentItem = index
    },
    [types.SET_BOTTOMSLIDER_ITEM](state, index) {
      state.currentbottomItem = index
    }
  },
  actions: {
    GetSliderItemAction({
      commit
    }, index) {
      console.log(index)
      commit(types.SET_SLIDER_ITEM, index)
    },
    GetBottomSliderItemAction({
      commit
    }, index) {
      commit(types.SET_BOTTOMSLIDER_ITEM, index)
    }
  }
}


